/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txweb.model;

import java.io.InputStream;

/**
 *
 * @author txdnet
 */
public class DownModel extends ModelView {

    // 下载数据类型 目前只支持OCT BIN输出
    private ViewType type;
    // 下载显示文件名称
    private String name;
    // 文件输入流
    private InputStream fileInputStream;
    // 文本输入内容
    private String text;

    public DownModel(ViewType type, String name, InputStream fileInputStream) {
        this.fileInputStream = fileInputStream;
        this.name = name;
        this.type = type;
    }

    public DownModel(ViewType type, String name, String text) {
        this.text = text;
        this.name = name;
        this.type = type;
    }

    /**
     * @return the type
     */
    @Override
    public ViewType getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    @Override
    public void setType(ViewType type) {
        this.type = type;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the fileInputStream
     */
    public InputStream getFileInputStream() {
        return fileInputStream;
    }

    /**
     * @param fileInputStream the fileInputStream to set
     */
    public void setFileInputStream(InputStream fileInputStream) {
        this.fileInputStream = fileInputStream;
    }

    /**
     * @return the text
     */
    public String getText() {
        return text;
    }

    /**
     * @param text the text to set
     */
    public void setText(String text) {
        this.text = text;
    }
}
